package com.losdun.points.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author sword.ye
 * @date 2025/4/13
 **/
@Getter
@AllArgsConstructor
public enum PointsOrderStatusEnum {
    wait_send(0,"待发货"),
    sended(1,"已发货"),
    received(2,"已收货"),
    cancel(3,"已取消")
    ;
    private final Integer code;
    private final String name;

    public static String getStatusText(Integer code) {
        String text="";
        for (PointsOrderStatusEnum statusEnum : PointsOrderStatusEnum.values()) {
            if(statusEnum.getCode().equals(code)) {
                text=statusEnum.getName();
                break;
            }
        }
        return text;
    }
}
